package com.lz.autotest.project.system.mapper;


import com.lz.autotest.project.system.domain.SysUser;
import com.lz.autotest.project.system.domain.perm.*;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

public interface SysUserPermMapper {

    public List<SysUserPerm> selectUserPermList(SysUserPerm userPerm);

    public List<SysUserPerm> selectAllUserPermList();

    public List<AccUser> selectUserAccPermList(AccUser accUser);

    public List<AccUser> selectDeptAccPermList(AccUser accUser);

    public List<GroupUser> selectUserGroupPermList(GroupUser groupUser);

    public List<GroupUser> selectDeptGroupPermList(GroupUser groupUser);

    public List<CfgUser> selectUserCfgPermList(CfgUser cfgUser);

    public List<CfgUser> selectDeptCfgPermList(CfgUser cfgUser);

    public List<IrcUser> selectUserIrcPermList(IrcUser ircUser);

    public List<IrcUser> selectDeptIrcPermList(IrcUser ircUser);

    public List<DivUser> selectUserDivPermList(DivUser divUser);

    public List<DivUser> selectDeptDivPermList(DivUser divUser);

    public List<VlsUser> selectUserVolPermList(VlsUser vlsUser);

    public List<VlsUser> selectDeptVolPermList(VlsUser vlsUser);

    public SysUserPerm selectUserPermListByUserId(Long userId);


    public int insertUserPerm(SysUserPerm userPerm);



    /**
     * 批量新增部门权限列表
     * @param userPermList 部门权限列表
     * @return 结果
     */
    public int batchUserPerm(List<SysUserPerm> userPermList);

    public int updateUserPerm(SysUserPerm userPerm);

    public int updateUserPermFlag(SysUserPerm userPerm);

    public List<Map> selectAllAccount();

    public List<Map> selectAllGroup();

    public List<Map> selectAllCfg();

    public int deleteUserPermById(Long userId);

    public int deleteUserPermByIds(Long[] userIds);

    public int clearUserPerm(Long[] userIds);

    public int clearUserPermDetail(Long[] userIds);


    public int edtUserAccPerm(AccUser accUser);

    public int edtUserGroupPerm(GroupUser groupUser);

    public int edtUserCfgPerm(CfgUser cfgUser);

    public int edtUserIrcPerm(IrcUser ircUser);

    public int edtUserDivPerm(DivUser divUser);

    public int edtUserVlsPerm(VlsUser vlsUser);

    void batchDeleteAccountUser(@Param("userId") Long userId,@Param("list")  List<AccUser> list);

    void batchInsertAccountUser(@Param("list")  List<AccUser> list);

    void batchDeleteCfgUser(@Param("userId") Long userId,@Param("list")  List<CfgUser> list);

    void batchDeleteIrcUser(@Param("userId") Long userId,@Param("list")  List<IrcUser> list);

    void batchDeleteDivUser(@Param("userId") Long userId,@Param("list")  List<DivUser> list);

    void batchDeleteVlsUser(@Param("userId") Long userId,@Param("list")  List<VlsUser> list);

    void batchInsertCfgUser(@Param("list")  List<CfgUser> list);

    void batchInsertIrcUser(@Param("list")  List<IrcUser> list);

    void batchInsertDivUser(@Param("list")  List<DivUser> list);

    void batchInsertVlsUser(@Param("list")  List<VlsUser> list);

    public int deleteCfgUser(Long[] userIds);

    public int deleteAccUser(Long[] userIds);

    public int deleteIrcUser(Long[] userIds);

    public int deleteDivUser(Long[] userIds);

    public int deleteVlsUser(Long[] userIds);

    public String getUserPermFlag(@Param("authType")String authType,@Param("userId")String userId);

    public List<SysUser> selectCfgAllocateUser(Map map);
}
